
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel=stylesheet href='include/hoj.css' type='text/css'>
</head>
<body>
<center>
<div style="width:90%; text-align:left">
<img src="image/logo.png"/>
</div>
<table width=96%> 
	<tr align="center" class='hd' valign="top">
				<th><a href="faqs.php">F.A.Qs</a></th>
		<th><a href="./bbs.php">Web Board</a></th>
		<th><a href="./">Home</a></th>
		<th><a href="./problemset.html">ProblemSet</a></th>
		<th><a href="./status.php">Status</a></th>
		<th><a href="./ranklist.php">Ranklist</a></th>
		<th><a href="./contest.php">Contest</a></th>
		<th><a href=loginpage.php>Login</a></th><th><a href=registerpage.php>Register</a></th>	</tr>
</table>
</center>
<center>
<div class="notice">
	<div>
		<B>Notice:</B>鉴于种种原因，本OJ自下周星期一（3月5号）开始不再全面开放，请各位做好善后事宜，谢谢合作。	</div>
</div>
</center>
</div>
<title>Problem 2288. -- 【POJ Challenge】生日礼物 -- 衡阳八中OJ离线版-2012-02-29</title><center><h2>2288: 【POJ Challenge】生日礼物</h2><span class=green>Time Limit: </span>10 Sec&nbsp;&nbsp;<span class=green>Memory Limit: </span>128 MB<br><span class=green>Submit: </span>191&nbsp;&nbsp;<span class=green>Solved: </span>55<br>[<a href='submitpage.php?id=2288'>Submit</a>][<a href='problemstatus.php?id=2288'>Status</a>][<a href='bbs.php?id=2288'>Discuss</a>]</center><h2>Description</h2><div class=content><p>
<dd>
<div>
<p>ftiasch 18岁生日的时候，lqp18_31给她看了一个神奇的序列 <em>A<sub>1</sub></em>, <em>A<sub>2</sub></em>, ..., <em>A<sub>N</sub></em>. 她被允许选择不超过 <em>M</em> 个连续的部分作为自己的生日礼物。</p>
<p>自然地，ftiasch想要知道选择元素之和的最大值。你能帮助她吗？</p>
<p><img src="http://media.openjudge.cn/images/g3198_1.jpg" alt="" /></p>
</div>
</dd>
<dd>
<div></div>
</dd>
</p></div><h2>Input</h2><div class=content><p>
<dd>
<div>
<p>第1行，两个整数 <em>N</em> (1 &le; <em>N</em> &le; 10<sup>5</sup>) 和 <em>M</em> (0 &le; <em>M</em> &le; 10<sup>5</sup>), 序列的长度和可以选择的部分。</p>
<p>第2行， <em>N</em> 个整数 <em>A<sub>1</sub></em>, <em>A<sub>2</sub></em>, ..., <em>A<sub>N</sub></em> (0 &le; |<em>A<sub>i</sub></em>| &le; 10<sup>4</sup>), 序列。</p>
</div>
</dd>
</p></div><h2>Output</h2><div class=content><p>
<dt>&nbsp; </dt>
<dd>
<p>一个整数，最大的和。</p>
</dd>
</p></div><h2>Sample Input</h2>
			<div class=content><span class=sampledata> <br />
5 2 <br />
2 -3 2 -1 2<br />
</span></div><h2>Sample Output</h2>
			<div class=content><span class=sampledata>5<br />
</span></div><h2>HINT</h2>
			<div class=content><p></p></div><h2>Source</h2>
			<div class=content><p><a href='problemset.html?search='></a></p></div><center>[<a href='submitpage.php?id=2288'>Submit</a>][<a href='problemstatus.php?id=2288'>Status</a>][<a href='bbs.php?id=2288'>Discuss</a>]</center>﻿<br>

<a href="./"><span class=red>HOME</span></a>
<a href="javascript:history.go(-1)"><span class=red>Back</span></a>

<hr>
<center>
	<div class="footer">
			<a href=setlang.php?lang=ko>한국어</a>&nbsp;
		<a href=setlang.php?lang=cn>中文</a>&nbsp;
		<a href=setlang.php?lang=fa>فارسی</a>&nbsp;
		<a href=setlang.php?lang=en>English</a>&nbsp;
		<a href=setlang.php?lang=th>ไทย</a>
	<br>		<div>版权所有 &copy;2008-2012 WaterPark Organization. | <script src="http://s21.cnzz.com/stat.php?id=2982771&web_id=2982771" language="JavaScript"></script>
</div>
		<div>Based on opensource project <a href="http://hustoj.googlecode.com">hustoj</a>.</div>
	</div>
</center>
</body>
</html>
